Skip to content

fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers#679

Open
svasista-ms wants to merge 8 commits into
microsoft:mainfrom
svasista-ms:fix/infverif-sample-flag-range
Open

fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers#679
svasista-ms wants to merge 8 commits into
microsoft:mainfrom
svasista-ms:fix/infverif-sample-flag-range

Conversation

@svasista-ms

@svasista-ms svasista-ms commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fix the InfVerif sample-class gate to skip InfVerif only for WDK builds 25798..=26100 (where the /sample flag is missing).

Partially addresses #170 (for cargo-wdk).

Screenshots

Before: cargo-wdk skips InfVerif for WDK Build# 28000 for samples:

image

After: cargo-wdk runs InfVerif for WDK Build# 28000 for `samples:

image ... image

Copilot AI review requested due to automatic review settings June 11, 2026 10:23
@svasista-ms svasista-ms changed the title fix(cargo-wdk): update WDK build number range fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates cargo-wdk’s InfVerif “sample-class” gating logic to only skip InfVerif for a bounded set of WDK build numbers where the required samples flag is missing, and adds/adjusts tests to cover the new behavior (partial progress toward #170).

Changes:

  • Narrow InfVerif-skip detection from an open-ended range to 25798..=26100.
  • Add a dedicated unit test asserting InfVerif is skipped for sample-class drivers within the affected WDK build range.
  • Refactor test expectations to allow asserting the packaging flow with and without InfVerif.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
crates/cargo-wdk/src/actions/build/tests.rs Adds a new regression test for the WDK-build bounded skip behavior and introduces a helper to assert the packaging path without InfVerif.
crates/cargo-wdk/src/actions/build/package_task.rs Changes the “missing samples flag” build-number range to a bounded inclusive range and updates the associated constant type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/cargo-wdk/src/actions/build/package_task.rs Outdated
Comment on lines +253 to +255
// WDK build 26100 is within the range whose InfVerif is missing the
// /sample flag, so InfVerif is skipped entirely for the sample class.
let test_build_action = &TestBuildAction::new(cwd.clone(), profile, None, sample_class)
Comment on lines +1962 to +1964
/// Sets up all package-task expectations except `infverif`. Useful for
/// asserting the sample-class path where `InfVerif` is skipped for WDK
/// builds whose `InfVerif` is missing the `/sample` flag.
@codecov-commenter

codecov-commenter commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.00%. Comparing base (21ec8f8) to head (b68cac2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #679      +/-   ##
==========================================
+ Coverage   79.93%   80.00%   +0.06%     
==========================================
  Files          26       26              
  Lines        5633     5635       +2     
  Branches     5633     5635       +2     
==========================================
+ Hits         4503     4508       +5     
+ Misses       1002      999       -3     
  Partials      128      128              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment on lines 2979 to 2983
expected_infverif_args.push("/u".to_string());
}
if self.sample_class {
expected_infverif_args.push("/msft".to_string());
expected_infverif_args.push("/samples".to_string());
}
.expect_probe_target_arch_using_cargo_rustc(&cwd, target_arch, None)
.expect_default_package_task_steps(driver_name, driver_type, target_arch, verify_signature)
.expect_detect_wdk_build_number(25100u32);
.expect_detect_wdk_build_number(28000u32);
Comment on lines +555 to +559
if wdk_build_number > *MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.end() {
"/samples"
} else {
"/msft"
}
Copilot AI review requested due to automatic review settings June 15, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread crates/cargo-wdk/src/actions/build/tests.rs Outdated
Comment thread crates/cargo-wdk/src/actions/build/tests.rs
@gurry

gurry commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Partially resolves #170 (for cargo-wdk).

@svasista-ms This will automatically close the issue? Are you sure you want that (as the issue is not fully fixed by this PR)?

Copilot AI review requested due to automatic review settings July 3, 2026 08:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@gurry gurry enabled auto-merge July 6, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants